<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>par_ui: /home/wouter/ros_packages/thp-pj2-08/par_ui/src/xyz.c Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>

<table border="0">
<tr><td valign="top" style="border-right: 1px solid #333; padding-right: 10px;" >
<p>
Project: <a href="http://ros.org/wiki/par_ui">par_ui</a>
</p>
<p>
License: BSD
</p>
<p>
Dependencies: 
<ul>
  <li>std_msgs</li>
  <li>roscpp</li>
  <li>par_kinematics</li>
  <li>par_trajectory_planning</li>
  <li>tinyxml</li>
</ul>
</p>
<p>
Used by:
None<br />
</p>
<p>
<a href="../../index.html">All Packages</a>
</p>

</div>
</td><td valign="top" style="padding-left: 10px;" >
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/home/wouter/ros_packages/thp-pj2-08/par_ui/src/xyz.c</h1>  </div>
</div>
<div class="contents">
<a href="xyz_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a><a class="code" href="xyz_8c.html#a0ddf1224851353fc92bfbff6f499fa97">00012</a> <span class="keywordtype">int</span> <a class="code" href="par__ui_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014         FILE* in  = fopen(argv[1], <span class="stringliteral">&quot;r&quot;</span>);
<a name="l00015"></a>00015         FILE* out = fopen(argv[2], <span class="stringliteral">&quot;w&quot;</span>);
<a name="l00016"></a>00016         
<a name="l00017"></a>00017         fprintf(out, <span class="stringliteral">&quot;&lt;?xml version=\&quot;1.0\&quot; ?&gt;\n&quot;</span>);
<a name="l00018"></a>00018         fprintf(out, <span class="stringliteral">&quot;&lt;config&gt;\n&quot;</span>);
<a name="l00019"></a>00019         fprintf(out, <span class="stringliteral">&quot;&lt;option number=\&quot;4\&quot;&gt;\n&quot;</span>);
<a name="l00020"></a>00020 
<a name="l00021"></a>00021         <span class="keywordtype">double</span> x, y, z;
<a name="l00022"></a>00022         <span class="keywordtype">int</span> i = 1;
<a name="l00023"></a>00023         <span class="keywordflow">while</span>( fscanf(in, <span class="stringliteral">&quot;%lg,%lg,%lg&quot;</span>, &amp;x, &amp;y, &amp;z) != EOF)
<a name="l00024"></a>00024         {
<a name="l00025"></a>00025                 printf(<span class="stringliteral">&quot;%g,%g,%g\n&quot;</span>, x, y, z);
<a name="l00026"></a>00026                 fprintf(out, <span class="stringliteral">&quot;\t&lt;row number=\&quot;%d\&quot;&gt;\n&quot;</span>, i);
<a name="l00027"></a>00027                 
<a name="l00028"></a>00028                 fprintf(out, <span class="stringliteral">&quot;\t\t&lt;X&gt;%lg&lt;/X&gt;\n&quot;</span>, x);
<a name="l00029"></a>00029                 fprintf(out, <span class="stringliteral">&quot;\t\t&lt;Y&gt;%lg&lt;/Y&gt;\n&quot;</span>, y);
<a name="l00030"></a>00030                 fprintf(out, <span class="stringliteral">&quot;\t\t&lt;Z&gt;%lg&lt;/Z&gt;\n&quot;</span>, z);
<a name="l00031"></a>00031                 fprintf(out, <span class="stringliteral">&quot;\t\t&lt;mode&gt;single&lt;/mode&gt;\n&quot;</span>);
<a name="l00032"></a>00032 
<a name="l00033"></a>00033                 fprintf(out, <span class="stringliteral">&quot;\t&lt;/row&gt;\n&quot;</span>);
<a name="l00034"></a>00034                 i++;
<a name="l00035"></a>00035         }
<a name="l00036"></a>00036 
<a name="l00037"></a>00037         fprintf(out, <span class="stringliteral">&quot;&lt;/option&gt;\n&quot;</span>);
<a name="l00038"></a>00038         fprintf(out, <span class="stringliteral">&quot;&lt;/config&gt;\n&quot;</span>);
<a name="l00039"></a>00039 
<a name="l00040"></a>00040         close(in);
<a name="l00041"></a>00041         close(out);
<a name="l00042"></a>00042 
<a name="l00043"></a>00043         <span class="keywordflow">return</span> 0;
<a name="l00044"></a>00044 }
</pre></div></div>
</div>
</td></tr></table>

<hr size="1"><div style="align: right;">
<a href="http://ros.org/wiki/par_ui">par_ui</a><br />
Author(s): Wouter van Teijlingen</br />
<small>autogenerated on Mon Jun 13 2011 17:06:40</small>
</div>
</body>
</html>
